export enum Sex {
  Male = 1,
  Female = 2,
}

export interface UserInfo {
  user_id: string;
  username: string;
  email: string;
  level: number;
  birthday: string;
  created_at: string;
  // phone: string;
  // sex: Sex;
}

export interface LoginInfo {
  email: string;
  password: string;
}

export interface LoginResponse {
  username: string;
  user_id: string;
  level: number;
  new_token: string;
}

export interface RegisterInfo {
  username: string;
  email: string;
  password: string;
}

export interface ResetPasswordInfo {
  id: string;
  old_password: string;
  new_password: string;
}

export function userInfoDefault(): UserInfo {
  return {
    user_id: '',
    username: '',
    email: '',
    level: 0,
    birthday: '',
    created_at: '',
    // sex: Sex.Male,
  };
}
